package com.study.demoservice.controller;

import org.springframework.web.bind.annotation.*;

@RestController
public class PathVariableController {


    @RequestMapping(path = "/h1/{name}", method = RequestMethod.GET)
    public String hello1(@PathVariable("name") String name) {
        return name;
    }

    @RequestMapping(path = "/h2", method = RequestMethod.GET)
    public String hello2(@RequestParam("name") String name) {
        return name;
    }

    @RequestMapping(path = "/h3", method = RequestMethod.GET)
    public String hello3(@RequestParam String name) {
        return name;
    }
}
